﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EventReminder.Common;
using EventReminder.Client.EventReminderServiceRef;

namespace EventReminder.Client
{
    class EventReminderRemoteProxy : IEventReminderService
    {
        IEventReminderService _remote;

        public EventReminderRemoteProxy()
        {
            _remote = new EventReminderServiceClient("WS2007HttpBinding_IEventReminderService");
        }

        public string Login(string userName, string password)
        {
            return _remote.Login(userName, password);
        }

        public string Register(string userName, string password, string firstName, string lastName, string email)
        {
            return _remote.Register(userName, password, firstName, lastName, email);
        }

        public EventData[] GetEvents(DateTime day, string sessionId)
        {
            return _remote.GetEvents(day, sessionId);
        }

        public void AddEvent(EventData e, string sessionId)
        {
            _remote.AddEvent(e, sessionId);
        }

        public void ModifyEvent(EventData old, EventData update, string sessionId)
        {
            _remote.ModifyEvent(old, update, sessionId);
        }

        public void DeleteEvent(EventData e, string sessionId)
        {
            _remote.DeleteEvent(e, sessionId);
        }

        public void Logout(string sessionId)
        {
            _remote.Logout(sessionId);
        }
    }
}
